﻿@model SenFangKaoHe_MVC.Models.ViewModel.TempTiKuKaoTi
@{
    Layout = null;
    ViewData["Title"] = @Model.tiku.tikuming + "理论学习";
}

<script src="/js/jquery-3.7.1.min.js"></script>
<link rel="stylesheet" href="~/css/ShiJuanStyle.css" />
<div id="info">
    <div id="info1">
        <div>
            @Model.tiku.tikuming
            <br />
            试题数量：@Model.tikukaoti.Count()
            <br />
            <hr />
            <div id="kaotidiv" style="text-align:left;">
            </div>
        </div>
    </div>
</div>


<script>
    var _html = "";
    var tkkts = @Json.Serialize(@Model.tikukaoti);
    console.log(tkkts);
    var th = 0;
    for(var i = 0;i<tkkts.length;i++){
        _html += "<div class='card'>";
        var tx = "";
        switch(tkkts[i].tixing){
            case 1:
                tx = "填空题";
                break;
            case 2:
                tx = "单选题";
                break;
            case 3:
                tx = "多选题";
                break;
            case 4:
                tx = "判断题";
                break;
        }
        var ktxx = "";
        if(tx != "填空题" ){
            var xx = tkkts[i].xuanxiang.split(";");
            for(var a = 0;a<xx.length;a++){

                if(tkkts[i].daan.includes(String.fromCharCode(65 + a))){
                    ktxx += "&nbsp;&nbsp;<lable style='color:#FF0000;'>"+String.fromCharCode(65 + a)+"、"+xx[a]+"</lable><br />";
                }else{
                    ktxx += "&nbsp;&nbsp;"+String.fromCharCode(65 + a)+"、"+xx[a]+"<br />";
                }
            }
        }
        _html += (i+1)+"、【"+tx+"】"+tkkts[i].timu+"<br />";
        _html += ktxx;
        _html+= "&nbsp;&nbsp;答案："+tkkts[i].daan+"<br />";
        _html += "</div>";
    }
    $("#kaotidiv").html(_html);
</script>